﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProjectMgmtUserControl.ascx.cs"
    Inherits="com.stifel.ProjectMgmt.ProjectMgmtUserControl" %>
<%--START: CSS and JS--%>
<link type="text/css" rel="Stylesheet" media="all" href="/_layouts/com.stifel.ProjectMgmt/stylesheets/ProjectMgmt.css" />
<script language="javascript" type="text/javascript" src="/_layouts/com.stifel.ProjectMgmt/scripts/jquery-1.4.1.min.js"></script>
<script language="javascript" type="text/javascript" src="/_layouts/com.stifel.ProjectMgmt/scripts/jquery-base64encoding.js"></script>
<script language="javascript" type="text/javascript" src="/_layouts/com.stifel.ProjectMgmt/scripts/jquery-custom.js"></script>
<script language="javascript" type="text/javascript" src="/_layouts/com.stifel.ProjectMgmt/scripts/js-custom.js"></script>
<script language="javascript" type="text/javascript">
// <![CDATA[
    /**
    * PROJECT MANAGEMENT DIALOG
    */
    /**
    * CONSTANTS 
    */
    var ACTIVEPROJECTS = '#<%= uiActiveProjects.ClientID %>';
    var ACTIVEPROJECTSDETAIL = '#uiActiveProject_Details';
    var ACTIVEPROJECTSSERVERSIDEREORDER = '#<%= uiActiveProject_Items.ClientID %>';
    var ACTIVEPROJECTSNUMBER = '#<%= uiLblActiveProjects_Number.ClientID %>';
    var INACTIVEPROJECTS = '#<%= uiInactiveProjects.ClientID %>';
    var INACTIVEPROJECTSDETAIL = '#uiInactiveProjects_Details';
    var INACTIVEPROJECTSSERVERSIDEREORDER = '#<%= uiInactiveProject_Items.ClientID %>';
    var INACTIVEPROJECTSNUMBER = '#<%= uiLblInactiveProjects_Number.ClientID %>';
    var INACTIVEPROJECTSLABEL = '#uilblInactiveProjects';
    var NEWACTIVEPROJECTS = '#<%= uiNewProjects.ClientID %>';
    var NEWACTIVEPROJECTSDETAIL = '#uiNewProjects_Details';
    var NEWACTIVEPROJECTSNUMBER = '#<%= uiLblNewProjects_Number.ClientID %>';
    var NEWACTIVEPROJECTSLABEL = '#uilblInactiveProjects';

    var MOVEACTIVEPROJECTUP = '#uiMoveActiveProjectUp';
    var MOVEACTIVEPROJECTDOWN = '#uiMoveActiveProjectDown';
    var MOVEACTIVEPROJECTTOTOP = '#uiMoveActiveProjectToTop';
    var MOVEACTIVEPROJECTTOBOTTOM = '#uiMoveActiveProjectToBottom';

    var ADDTOINACTIVEPROJECTS = '#uiAddToInactiveProjects';
    var ADDTOACTIVEPROJECTS = '#uiAddToActiveProjects';

    var PROJECTSDIALOG = '#uiProjects';
    var PROJECTSDIALOGNAVIGATION = '#uiNavigation';
    var PROJECTSDIALOGPANEL = '#<%= uiPrj.ClientID %>';
    var PROJECTSDIALOGCOMMANDPANEL = '#uiCommand';

    var EXPORTBUTTON = '#<%= uiExportButton.ClientID %>';

    function init() {
        //resizeThis();

        selectActiveProject();
        selectInactiveProject();
        selectNewProject();
        setNumberActiveProjects();
        setNumberInactiveProjects();
        setNumberNewProjects();
    }

    /**
    * window load event
    * Force a resizing of the dialog components. Add binding to various componenets.
    */
    $(window).load(function () {
        init();
    });

    /**
    * window resize event
    * Force a resizing of the dialog components.
    */
    $(window).resize(function () {
        init();
    });

    /**
    * resizeThis
    * Resize the dialog appropriately.
    */
    function resizeThis() {
        //$(PROJECTSDIALOG).height(600);
        //--$(PROJECTSDIALOGPANEL).height(600);
        //var w = $(PROJECTSDIALOG).clientWidth();
        var w = $(PROJECTSDIALOGPANEL).width();
        var activeprojects_position = $(ACTIVEPROJECTS).position();
        var x = activeprojects_position.left;

        var nw = $(PROJECTSDIALOGNAVIGATION).width();
        $(ACTIVEPROJECTS).width(w - nw - x);
        $(ACTIVEPROJECTSDETAIL).width((w - x) * 0.66);
        $(INACTIVEPROJECTS).width((w - nw - x - 8) - $(ACTIVEPROJECTSDETAIL).width());

        //var h = $(PROJECTSDIALOG).clientHeight();
        var h = $(PROJECTSDIALOGPANEL).height();
        var y = $(ACTIVEPROJECTS).height();
        var t = activeprojects_position.top;
        $(ACTIVEPROJECTSDETAIL).height(h - y - t - t);
        //$(PROJECTSDIALOGPANEL).height(h);
        var projectsdialogpanel_position = $(PROJECTSDIALOGPANEL).position();
        $(PROJECTSDIALOGCOMMANDPANEL).position().top = (projectsdialogpanel_position.top + h);

        $(INACTIVEPROJECTSDETAIL).height($(ACTIVEPROJECTSDETAIL).height() - $(INACTIVEPROJECTS).height() - $(INACTIVEPROJECTSLABEL).height() - 8);
    }

    /**
    * selectActiveProject
    * Select the active project and show details.
    */
    function selectActiveProject() {
        var o = $(ACTIVEPROJECTS).ele();
        var index = o.selectedIndex;
        if (index < 0) {
            if (o.options.length <= 0) {
                $(ACTIVEPROJECTSDETAIL).html('');
                return;
            } else {
                index = 0;
                o.selectedIndex = index;
            }
        }
        var value = o.options[index].value.split('||')[0];
        var text = o.options[index].text;
        $(ACTIVEPROJECTSDETAIL).html($.base64Decode(value));
    }

    /**
    * selectInactiveProject
    * Select the inactive project and show details.
    */
    function selectInactiveProject() {
        var o = $(INACTIVEPROJECTS).ele();
        var index = o.selectedIndex;
        if (index < 0) {
            if (o.options.length <= 0) {
                $(INACTIVEPROJECTSDETAIL).html('');
                return;
            } else {
                index = 0;
                o.selectedIndex = index;
            }
        }
        var value = o.options[index].value.split('||')[0];
        var text = o.options[index].text;
        $(INACTIVEPROJECTSDETAIL).html($.base64Decode(value));
    }

    /**
    * selectNewProject
    * Select the new project and show details.
    */
    function selectNewProject() {
        var o = $(NEWACTIVEPROJECTS).ele();
        var index = o.selectedIndex;
        if (index < 0) {
            if (o.options.length <= 0) {
                $(NEWACTIVEPROJECTSDETAIL).html('');
                return;
            } else {
                index = 0;
                o.selectedIndex = index;
            }
        }
        var value = o.options[index].value.split('||')[0];
        var text = o.options[index].text;
        $(NEWACTIVEPROJECTSDETAIL).html($.base64Decode(value));
    }

    /**
    * getProjects
    * Get the active and inactive projects from the ui and put the current values into the appropriate
    * hidden server-side accessible fields.
    **/
    function getProjects() {
        getActiveProjects();
        getInactiveProjects();
    }

    /**
    * getActiveProjects
    * The reordering of the projects is accomplished client-side. Server-side has no knowledge of the 
    * current order, and whether a project has been added.
    * This function gets the projects from the active projects list box, formats the options into an JSON
    * array and sets the value of the active projects hidden field to the JSON array. Server-side the
    * projects are retrieved from the active projects hidden field.
    **/
    function getActiveProjects() {
        var s = '';
        var listbox = $(ACTIVEPROJECTS).ele();
        for (var i = 0; i < listbox.options.length; i++) {
            s = format("{0}{'text':'{1}','value':'{2}'},", s, listbox.options[i].text, listbox.options[i].value);
        }
        var t = format("[{0}]", s.substring(0, s.length - 1));

        var items = $(ACTIVEPROJECTSSERVERSIDEREORDER).ele();
        items.value = t;
    }

    /**
    * getInactiveProjects
    * Server-side has no knowledge of the current inactive project. Client-side a project can be added or
    * removed.
    * This function gets the projects from the inactive projects list box, formats the options into an JSON
    * array and sets the value of the inactive projects hidden field to the JSON array. Server-side the
    * projects are retrieved from the inactive projects hidden field.
    **/
    function getInactiveProjects() {
        var s = '';
        var listbox = $(INACTIVEPROJECTS).ele();
        for (var i = 0; i < listbox.options.length; i++) {
            s = format("{0}{'text':'{1}','value':'{2}'},", s, listbox.options[i].text, listbox.options[i].value);
        }
        var t = format("[{0}]", s.substring(0, s.length - 1));

        var items = $(INACTIVEPROJECTSSERVERSIDEREORDER).ele();
        items.value = t;
    }

    function disableExport() {
        var o = $(EXPORTBUTTON);
        if (o) o.hide();
    }

    /**
    * addToInactiveProjects
    * Add the currently selected active project to the inactive projects.
    */
    function addToInactiveProjects() {
        disableExport();
        var targetlist = $(INACTIVEPROJECTS).ele();

        var targetndx = 0;

        var sourcelist = $(ACTIVEPROJECTS).ele();
        var sourcendx = sourcelist.selectedIndex;
        if (sourcendx < 0) return;

        var sourcetext = sourcelist.options[sourcendx].text;
        var sourcevalue = sourcelist.options[sourcendx].value;
        sourcelist.remove(sourcendx);
        var targetitem = new Option(sourcetext, sourcevalue);
        $(INACTIVEPROJECTS).addToSelect(targetitem, targetndx);

        targetlist.selectedIndex = targetndx;
        if (sourcendx > sourcelist.options.length - 1) {
            sourcelist.selectedIndex = sourcendx - 1;
        }
        else {
            sourcelist.selectedIndex = sourcendx;
        }

        selectActiveProject();
        selectInactiveProject();
        setNumberActiveProjects();
        setNumberInactiveProjects();
    }

    /**
    * setNumberActiveProjects
    * Indicate on the dialog the number of active projects.
    */
    function setNumberActiveProjects() {
        $(ACTIVEPROJECTSNUMBER).html($(ACTIVEPROJECTS).ele().options.length);
    }

    /**
    * setNumberInactiveProjects
    * Indicate on the dialog the number of inactive projects.
    */
    function setNumberInactiveProjects() {
        $(INACTIVEPROJECTSNUMBER).html($(INACTIVEPROJECTS).ele().options.length);
    }

    /**
    * setNumberNewProjects
    * Indicate on the dialog the number of new projects.
    */
    function setNumberNewProjects() {
        $(NEWACTIVEPROJECTSNUMBER).html($(NEWACTIVEPROJECTS).ele().options.length);
    }

    /**
    * addToActiveProjectsFromNewProjects
    * Add the currently selected new project to the active projects.
    */
    function addToActiveProjectsFromNewProjects() {
        disableExport();
        var targetlist = $(ACTIVEPROJECTS).ele();

        var targetndx = targetlist.selectedIndex;
        if (targetndx < 0) targetndx = 0;

        var sourcelist = $(NEWACTIVEPROJECTS).ele();
        var sourcendx = sourcelist.selectedIndex;
        if (sourcendx < 0) return;

        var sourcetext = sourcelist.options[sourcendx].text;
        var sourcevalue = sourcelist.options[sourcendx].value;
        sourcelist.remove(sourcendx);
        var targetitem = new Option(sourcetext, sourcevalue);
        $(ACTIVEPROJECTS).addToSelect(targetitem, targetndx);

        targetlist.selectedIndex = targetndx;
        if (sourcendx > sourcelist.options.length - 1) {
            sourcelist.selectedIndex = sourcendx - 1;
        }
        else {
            sourcelist.selectedIndex = sourcendx;
        }

        selectActiveProject();
        selectInactiveProject();
        selectNewProject();
        setNumberActiveProjects();
        setNumberInactiveProjects();
        setNumberNewProjects();
    }

    /**
    * addToActiveProjects
    * Add the currently selected inactive project to the active projects.
    */
    function addToActiveProjects() {
        disableExport();
        var targetlist = $(ACTIVEPROJECTS).ele();

        var targetndx = targetlist.selectedIndex;
        if (targetndx < 0) targetndx = 0;

        var sourcelist = $(INACTIVEPROJECTS).ele();
        var sourcendx = sourcelist.selectedIndex;
        if (sourcendx < 0) return;

        var sourcetext = sourcelist.options[sourcendx].text;
        var sourcevalue = sourcelist.options[sourcendx].value;
        sourcelist.remove(sourcendx);
        var targetitem = new Option(sourcetext, sourcevalue);
        $(ACTIVEPROJECTS).addToSelect(targetitem, targetndx);

        targetlist.selectedIndex = targetndx;
        if (sourcendx > sourcelist.options.length - 1) {
            sourcelist.selectedIndex = sourcendx - 1;
        }
        else {
            sourcelist.selectedIndex = sourcendx;
        }

        selectActiveProject();
        selectInactiveProject();
        selectNewProject();
        setNumberActiveProjects();
        setNumberInactiveProjects();
        setNumberNewProjects();
    }

    /**
    * moveActiveProjectUp
    * Move the currently selected project up, i.e. raising the priority.
    */
    function moveActiveProjectUp() {
        moveActiveProject('up');
    }

    /**
    * moveActiveProjectDown
    * Move the currently selected project down, i.e. lowering the priority.
    */
    function moveActiveProjectDown() {
        moveActiveProject('down');
    }

    /**
    * moveActiveProjectToTop
    * Move the currently selected project to the top, i.e. raising the priority.
    */
    function moveActiveProjectToTop() {
        moveActiveProject('top');
    }

    /**
    * moveActiveProjectToBottom
    * Move the currently selected project to the bottom, i.e. lowering the priority.
    */
    function moveActiveProjectToBottom() {
        moveActiveProject('bottom');
    }

    /**
    * moveActiveProject
    * Moves the currently selected project in the specified direction; i.e. changing the priority.    
    */
    function moveActiveProject(direction) {
        disableExport();
        var listbox = $(ACTIVEPROJECTS).ele();
        var sourcendx = listbox.selectedIndex;
        var targetndx = -1;
        var UP = false;
        var DOWN = false;
        var TOP = false;
        var BOTTOM = false;

        if (-1 == sourcendx) {
            alert("Please select an option to move.");
            return;
        }

        var increment = -1;
        if (direction.startsWith('u')) {
            increment = -1;
            targetndx = sourcendx - 1;
            UP = true;
        }
        else if (direction.startsWith('d')) {
            increment = 1;
            targetndx = sourcendx + 1;
            DOWN = true;
        } else if (direction.startsWith('t')) {
            targetndx = 0;
            TOP = true;
        } else if (direction.startsWith('b')) {
            targetndx = listbox.options.length - 1;
            BOTTOM = true;
        }

        if (targetndx < 0 || targetndx > listbox.options.length - 1) {
            return;
        }

        var sourcevalue = listbox.options[sourcendx].value;
        var sourcetext = listbox.options[sourcendx].text;

        if (UP) {
            var newitem = new Option(sourcetext, sourcevalue);
            listbox.remove(sourcendx);
            $(ACTIVEPROJECTS).addToSelect(newitem, targetndx);
        } else if (DOWN) {
            var newitem = new Option(sourcetext, sourcevalue);
            listbox.remove(sourcendx);
            $(ACTIVEPROJECTS).addToSelect(newitem, targetndx);
        } else if (TOP) {
            var newitem = new Option(sourcetext, sourcevalue);
            listbox.remove(sourcendx);
            $(ACTIVEPROJECTS).addToSelect(newitem, 0);
        } else if (BOTTOM) {
            var newitem = new Option(sourcetext, sourcevalue);
            listbox.remove(sourcendx);
            $(ACTIVEPROJECTS).addToSelect(newitem, null);
        }

        listbox.selectedIndex = targetndx;
        selectActiveProject();
    }
// ]]>
</script>
<style type="text/css">
    .style4
    {
        width: 15px;
        height: 89px;
    }
    .style5
    {
        width: 25px;
        height: 201px;
    }
    .style6
    {
        text-align: right;
        width: 475px;
        height: 36px;
    }
    .style6l
    {
        text-align: left;
        width: 475px;
        height: 36px;
    }
    #uiPrj
    {
        margin-right: 0px;
    }
    .style7
    {
        width: 950px;
    }
    .style9
    {
        width: 475px;
        height: 100%;
    }
    .style10
    {
        height: 201px;
        width: 450px;
    }
    .style11
    {
        height: 88px;
        vertical-align: top;
    }
    .style12
    {
        height: 89px;
        width: 450px;
    }
    .style13
    {
        width: 25px;
        height: 89px;
    }
    .style14
    {
        width: 475px;
        height: 201px;
    }
    .style15
    {
        height: 89px;
    }
</style>
<%--END: CSS and JS--%>
<%--START: http://msdn.microsoft.com/en-us/library/ee231545.aspx--%>
<asp:HiddenField ID="SharePoint_Project_FileNameWithoutExtension" Value="$SharePoint.Project.FileNameWithoutExtension$"
    runat="server" />
<asp:HiddenField ID="SharePoint_Project_AssemblyFullName" Value="$SharePoint.Project.AssemblyFullName$"
    runat="server" />
<asp:HiddenField ID="SharePoint_ProjectItem_Name" Value="$SharePoint.ProjectItem.Name$"
    runat="server" />
<%--END: http://msdn.microsoft.com/en-us/library/ee231545.aspx--%>
<asp:HiddenField runat="server" ID="uiActiveProject_Items" />
<asp:HiddenField runat="server" ID="uiInactiveProject_Items" />
<asp:HiddenField runat="server" ID="uiSiteCollectionURL" />
<div runat="server" id="uiPrj" class="label">
    <table width="950px">
        <tr>
            <td valign="top" class="style10">
                <b>
                    <asp:Literal ID="uiLblActiveProjects" runat="server" Text="Active Projects -" /></b>&nbsp;<span
                        id="uiLblActiveProjects_Number" runat="server"></span><br />
                <select runat="server" id="uiActiveProjects" style="height: 177px; width: 100%; font-family: Verdana, Helvetica, Sans-Serif;
                    font-size: 8pt;" onclick="selectActiveProject();" onkeyup="selectActiveProject();"
                    ondblclick="moveActiveProjectUp();" size="5">
                </select>
            </td>
            <td valign="top" align="center" class="style5">
                <div id="uiNavigation" style="width: 25px;">
                    <br />
                    <br />
                    <img id="uiMoveActiveProjectToTop" src="/_layouts/com.stifel.ProjectMgmt/images/Top_bw24.png"
                        alt="Move to Top" title="Move to Top" onclick="moveActiveProjectToTop();" /><br />
                    <img id="uiMoveActiveProjectUp" src="/_layouts/com.stifel.ProjectMgmt/images/Up_bw24.png"
                        alt="Move Up" title="Move Up" onclick="moveActiveProjectUp();" /><br />
                    <img id="uiMoveActiveProjectDown" src="/_layouts/com.stifel.ProjectMgmt/images/Down_bw24.png"
                        alt="Move Down" title="Move Down" onclick="moveActiveProjectDown();" /><br />
                    <img id="uiMoveActiveProjectToBottom" src="/_layouts/com.stifel.ProjectMgmt/images/bottom_bw24.png"
                        alt="Move to Bottom" title="Move to Bottom" onclick="moveActiveProjectToBottom();" /><br />
                    <br />
                    <img id="uiAddToInactiveProjects" src="/_layouts/com.stifel.ProjectMgmt/images/add_favourite-bw.png"
                        alt="Move to Bottom" title="Add to Inactive Projects" onclick="addToInactiveProjects();" /><br />
                </div>
            </td>
            <td style="vertical-align: top;" class="style14">
                <table style="height: 177px; width: 100%;">
                    <tr>
                        <td class="style12">
                            <div>
                                <b>
                                    <asp:Literal ID="uiLblNewProjects" Text="New Projects -" runat="server" /></b>&nbsp;<span
                                        id="uiLblNewProjects_Number" runat="server"></span></div>
                            <select runat="server" id="uiNewProjects" style="height: 70px; width: 100%; font-family: Verdana, Helvetica, Sans-Serif;
                                font-size: 8pt;" size="5" onclick="selectNewProject();" ondblclick="addToActiveProjectsFromNewProjects();">
                            </select>
                        </td>
                        <td valign="top" align="center" class="style13">
                            <br />
                            <br />
                            <img id="uiAddToActiveProjectsFromNewProjects" src="/_layouts/com.stifel.ProjectMgmt/images/add_favourite-bw.png"
                                alt="Add to Active Projects" title="Add to Active Projecs" onclick="addToActiveProjectsFromNewProjects();" /><br />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="style11">
                            <div id="uiNewProjects_Details" style="border: thin solid #e0e0e0; background-color: #f8f8f8;
                                overflow: auto; height: 95px; width: 475px; margin-right: 0px;" class="data">
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td valign="top" colspan="2">
                <div id="uiActiveProject_Details" style="border: thin solid #e0e0e0; height: 174px;
                    background-color: #f8f8f8; overflow: auto; width: 475px;" class="data">
                </div>
            </td>
            <td valign="top" class="style9">
                <table style="width: 174px">
                    <tr style="height: 89px">
                        <td class="style15">
                            <div>
                                <b>
                                    <asp:Literal ID="uiLblInactiveProjects" Text="Inactive Projects -" runat="server" /></b>&nbsp;<span
                                        id="uiLblInactiveProjects_Number" runat="server"></span></div>
                            <select runat="server" id="uiInactiveProjects" style="height: 70px; width: 450px;
                                font-family: Verdana, Helvetica, Sans-Serif; font-size: 8pt;" onclick="selectInactiveProject();"
                                onkeyup="selectInactiveProject();" ondblclick="addToActiveProjects();" size="5">
                            </select>
                        </td>
                        <td valign="top" align="center" class="style4">
                            <br />
                            <br />
                            <img id="uiAddToActiveProjects" src="/_layouts/com.stifel.ProjectMgmt/images/add_favourite-bw.png"
                                alt="Add to Active Projects" title="Add to Active Projecs" onclick="addToActiveProjects();" /><br />
                        </td>
                    </tr>
                    <tr style="height: 85px">
                        <td colspan="2">
                            <div id="uiInactiveProjects_Details" style="border: thin solid #e0e0e0; background-color: #f8f8f8;
                                overflow: auto; height: 82px; width: 475px;" class="data">
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr style="width: 100%">
            <td class="style7" colspan="3">
                <table id="uiCommand" style="padding-left: 0px; padding-right: 15px; margin-left: 0px;
                    margin-right: 15px; width: 100%;">
                    <tr>
                        <td class="style6l">
                            <asp:HyperLink ID="uiExportButton" runat="server" ImageUrl="~/_layouts/com.stifel.ProjectMgmt/images/Export-Excel.PNG"
                                NavigateUrl="" ToolTip="Export"></asp:HyperLink>
                        </td>
                        <td class="style6">
                            <asp:ImageButton ID="uiOkButton" ImageUrl="~/_layouts/com.stifel.ProjectMgmt/images/Accept-round.PNG"
                                runat="server" OnClientClick="getProjects();return confirm('Save?');" CommandArgument="OK"
                                OnClick="uiOkButton_Click" ToolTip="Save" />
                            <asp:ImageButton ID="uiCancelButton" ImageUrl="~/_layouts/com.stifel.ProjectMgmt/images/Cancel-round.PNG"
                                runat="server" OnClick="uiCancelButton_Click" OnClientClick="return confirm('Cancel?');"
                                Width="32px" ToolTip="Cancel" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>
<asp:Literal ID="uiNumberOfSites" runat="server"></asp:Literal>
